package IO;

import java.io.File;
import java.io.IOException;

public class IODemo1 {
    public static void main(String[] args) throws IOException {
        File file = new File("./cat.jpg");

        System.out.println(file.getParent());  //父路径
        System.out.println(file.getPath());    //路径
        System.out.println(file.getAbsoluteFile());  //绝对路径 (带.的)
        System.out.println(file.getCanonicalFile()); //修饰过的绝对路径 (不带.的)
    }
}
